<script src="f.papers.discern.info.component.ts"></script>
<div class="bpm-work">
  <div class="bpm-work-ex">
    <div class="bpm-work-ex-content">
      <div class="bpm-tabs">
        <h2 class="bpm-tabs-title">
          人工证件识别数据
        </h2>
        <div class="bpm-tabs-sub">
          <div class="bpm-tabs-sub-ioc"></div>
          <div class="bpm-tabs-sub-h2">基本信息</div>
        </div>
        <table>
          <input nz-input [(ngModel)]="fs.er.id" [hidden]="true"
                 name="id" required #id="ngModel" />

          <tr>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">通道</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" [nzValidateStatus]="channel.invalid?'error':'success'" nzHasFeedback>
                <input nz-input [(ngModel)]="fs.er.channel"
                       name="channel" required #channel="ngModel" />
            </nz-form-control>
            </td>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">记录日期</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" [nzValidateStatus]="recorddate.invalid?'error':'success'" nzHasFeedback>
                <nz-date-picker
                                [(ngModel)]="fs.er.recorddate"
                                name="recorddate" required #recorddate="ngModel"></nz-date-picker>
              </nz-form-control>
            </td>
          </tr>

          <tr>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">受检人员</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" >
							<nz-select class="form-control" [(ngModel)]="fs.er.subjects"
                                name="subjects" required #subjects="ngModel"
                                (nzOpenChange)="cms_sjryDic.load('0')" [nzPlaceHolder]="'请选择'">
							  <nz-option *ngFor="let option of cms_sjryDic.datas" [nzLabel]="option.display" [nzValue]="option.id">
							  </nz-option>
							  <nz-option *ngIf="cms_sjryDic.isLoading" nzDisabled nzCustomContent>
							    <i nz-icon type="loading" class="loading-icon"></i>加载中...
							  </nz-option>
							  <span *ngIf="!cms_sjryDic.isLoaded">
							    <nz-option [nzLabel]="fs.er.subjectsName" [nzValue]="fs.er.subjects">
							    </nz-option>
							  </span>
							</nz-select>
              </nz-form-control>
            </td>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">受检人数</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" >
                <nz-input-number [(ngModel)]="fs.er.subjectcount"
                                 name="subjectcount" required #subjectcount="ngModel"
                                 [nzMin]="1" [nzStep]="1" class="form-control">
                </nz-input-number>
              </nz-form-control>
            </td>
          </tr>

          <tr>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">验证总时间</nz-form-label>
            </td>
            <td class="form-input">
              	<nz-form-control class="form-control" [nzValidateStatus]="totaltime.invalid?'error':'success'" nzHasFeedback>
                        		<nz-time-picker nzShowTime
                            		[(ngModel)]="fs.er.totaltime" nzFormat="HH:mm"
                                	name="totaltime" required #totaltime="ngModel"></nz-time-picker>
                        	</nz-form-control>
            </td>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">通过率</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control">
                <nz-input-number nz-input [(ngModel)]="fs.er.passrate"
                                 name="passrate" required #passrate="ngModel"
                                 [nzMin]="1" [nzMax]="100" [nzStep]="1" class="form-control"></nz-input-number>
              </nz-form-control>
            </td>
          </tr>

          <tr>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">记录人员签字</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control">
                            <input nz-input [(ngModel)]="fs.er.signature"
                                	name="signature" required #signature="ngModel" />
                        </nz-form-control>
            </td>

            <td class="form-text">
              <nz-form-label nzRequired class="form-label">证件识别通道运行状况</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" >
                <nz-select class="form-control" [(ngModel)]="fs.er.recognitionstatus"
                           name="recognitionstatus" required #recognitionstatus="ngModel"
                           (nzOpenChange)="cms_tdyxzkDic.load('0')" [nzPlaceHolder]="'请选择'">
                  <nz-option *ngFor="let option of cms_tdyxzkDic.datas" [nzLabel]="option.display" [nzValue]="option.id">
                  </nz-option>
                  <nz-option *ngIf="cms_tdyxzkDic.isLoading" nzDisabled nzCustomContent>
                    <i nz-icon type="loading" class="loading-icon"></i>加载中...
                  </nz-option>
                  <span *ngIf="!cms_tdyxzkDic.isLoaded">
							    <nz-option [nzLabel]="fs.er.recognitionstatusName" [nzValue]="fs.er.recognitionstatus">
							    </nz-option>
							  </span>
                </nz-select>
              </nz-form-control>
            </td>
          </tr>

          <tr>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">备注</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control">
                            <input nz-input [(ngModel)]="fs.er.remark"
                                	name="remark" required #remark="ngModel" />
                        </nz-form-control>
            </td>
          </tr>
        </table>

        <!-- 数据源组 -->
        <div class="bpm-tabs-sub">
          <div class="bpm-tabs-sub-ioc"></div>
          <div class="bpm-tabs-sub-h2">人证不符信息记录</div>
          <th>
                        <span class="form-edit" (click)="addRow()">
                            <添加>
                        </span>
          </th>
        </div>
        <nz-table nzSize="middle" [nzData]="[{}]" [nzShowPagination]='false'>
          <thead>
          <tr>
            <th nzWidth="20%">序号</th>
            <th nzWidth="20%">人证不符原因</th>
            <th nzWidth="20%">操作</th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let data of fs.er.record;let i = index">
            <td class="form-input">
              <span class="form-edit" (click)="editRow(data,i)">{{data.serialnumber}}</span>
            </td>
            <td>{{data.cause}}</td>
            <td class="form-input">
              <a class="form-button" nz-popconfirm nzTitle="确认删除选择项?"
                 (nzOnConfirm)="fs.delLocalRow(fs.er.record, data)" nzPlacement="bottomRight">删除</a>
            </td>
          </tr>
          </tbody>
        </nz-table>
      </div>
      </div>
    </div>
  </div>
  <div class="content-loading" *ngIf="fs.isLoading || fs.isSaveing">
    <nz-spin [nzSize]="'large'"></nz-spin>
  </div>
<div class="bpm-foot">
  <div class="tools">
    <div class="item" (click)="save()">
      <i nz-icon type="save" class="icon"></i>
      <span class="text">保存</span>
    </div>
    <div class="item" (click)="close()">
      <i nz-icon type="logout" class="icon"></i>
      <span class="text">关闭</span>
    </div>
  </div>
</div>
<nz-modal nzWidth='830' nzTitle="编辑" [nzMaskClosable]='false' [nzFooter]="null" [(nzVisible)]="fs.isEditVisible"
          (nzOnCancel)="fs.closeEdit()">
  <form nz-form [nzLayout]="'inline'">
    <div nz-row [nzGutter]="24">
      <div nz-col [nzSpan]="12">
        <nz-form-item>
          <nz-form-label nzRequired class="form-label">序号</nz-form-label>
          <nz-form-control class="form-control" [nzValidateStatus]="serialnumber.invalid?'error':'success'" nzHasFeedback>
            <nz-input-number [(ngModel)]="child.serialnumber"
                             name="serialnumber" required #serialnumber="ngModel"
                             [nzMin]="1" [nzStep]="1" class="form-control">
            </nz-input-number>
          </nz-form-control>
        </nz-form-item>
      </div>
      <div nz-col [nzSpan]="12">
        <nz-form-item>
          <nz-form-label nzRequired class="form-label">人证不符原因</nz-form-label>
          <nz-form-control class="form-control" [nzValidateStatus]="cause.invalid?'error':'success'" nzHasFeedback>
            <input nz-input [(ngModel)]="child.cause"
                   name="cause" required #cause="ngModel" />
          </nz-form-control>
        </nz-form-item>
      </div>
    </div>
    <div nz-row [nzGutter]="24">
      <div nz-col [nzSpan]="24" class="form-button-align">
        <button nz-button nzType="default" (click)="childClose()" class="form-button">取消</button>
        <button *ngIf="ss.mi.sa || ss.mi.rgzjsbxg" nz-button nzType="primary"
                [disabled]='serialnumber.invalid || cause.invalid'
                (click)="childSave()" [nzLoading]="fs.isSaveing">保存</button>
      </div>
    </div>
  </form>
</nz-modal>
